1. Technical Field
This invention generally relates to the optimization of computer programs, and more specifically relates to a computer mechanism and method for determining the scheduling of instructions in a computer program.
2. Background Art
The development of the EDVAC computer system in 1948 is generally considered the beginning of the computer era. Since that time, dramatic advances in both hardware and software (e.g., computer programs) have drastically improved the performance of computer systems. Modern software has become very complex when compared to early computer programs. Many modern computer programs have tens or hundreds of thousands of instructions. The execution time (and hence, performance) of a computer program is very closely related to the number of instructions that are executed as the computer program runs. Thus, as the size and complexity of computer programs increase, the execution time of the computer program increases as well.
Unlike early computer programs, modern computer programs are typically written in a high-level language that is easy to understand by a human programmer. Special software tools known as compilers take the human-readable form of a computer program, known as "source code", and convert it into "machine code" or "object code" instructions that may be executed by a computer system. Because a compiler generates the stream of machine code instructions that are eventually executed on a computer system, the manner in which the compiler converts the source code to object code affects the execution time of the computer program.
Computer hardware has evolved to provide faster execution of computer programs. For example, most modern processors include multiple instruction pipelines that can process two instructions in parallel if the two instructions are not dependent on each other. In an environment with multiple pipelines, the execution time of a computer program, especially complex computer programs, is a function of the arrangement of the instructions within the computer program. Modern compilers typically include an instruction scheduling mechanism that determines the dependences among instructions and produces a schedule or ordering of instructions in an attempt to maximize the parallelism in the computer program by scheduling, when possible, instructions to be executed simultaneously by different pipelines. However, known compilers do not take advantage of some parallelism that may exist in the computer program. Without an improved instruction scheduling mechanism and method, pipelines in a computer system will not be used to their maximum potential, and performance of computer systems will therefore suffer.